import {createSlice} from "@reduxjs/toolkit";

const userSlice = createSlice({
    name: "userSlice",
    initialState: {
        button: [],
        userInfo: {},
        menu: [],
    },
    reducers: {
        CHANGE_BUTTON: (state, action) => {
            state.button = action.payload
        },
        CHANGE_USERINFO: (state, action) => {
            state.userInfo = action.payload
        },
        CHANGE_MENU: (state, action) => {
            state.menu = action.payload
        }
    }
})

export const {CHANGE_BUTTON, CHANGE_USERINFO, CHANGE_MENU} = userSlice.actions
export default userSlice.reducer